package com.example.woke1;

import com.zhongcai.online.R;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.TextView;

public class ZhcailicaisuecssActivity extends Activity {

	private String money;
	private Intent intent;
	private String product_title = "";
	private String type = "";

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_zhcailicaisuecss);
		
		intview();
		
	}

	private void intview() {
		intent = getIntent();
		money = intent.getStringExtra("money");
		type = ""+intent.getStringExtra("type");
		product_title = ""+intent.getStringExtra("product_title");
		TextView mTredtitle = (TextView) findViewById(R.id.zhcailicaisuc_text_redtitle);
		TextView mTout = (TextView) findViewById(R.id.zhcailicaisuc_text_out);
		TextView mTtitle = (TextView) findViewById(R.id.zhcailicaisuc_text_title);
		TextView mTtoptitle = (TextView) findViewById(R.id.avzhcailicaisuc_text_toptitle);
		TextView mTblacktitle = (TextView) findViewById(R.id.zhcailicaisuc_text_blacktitle);
		if(type.equals("out")){
			mTredtitle.setText("转出成功");
			mTblacktitle.setText("转出项目");
			mTtoptitle.setText("转出成功");
			mTout.setText("转出金额");
		}else if(type.equals("in")){
			mTtitle.setText("中财活期项目");
		}else{
			mTredtitle.setText("购买成功");
			mTblacktitle.setText("购买项目");
			mTtitle.setText(product_title);
			mTtoptitle.setText("购买成功");
			mTout.setText("购买金额");
		}
		findViewById(R.id.avzhcailicaisuc_image_back).setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				finish();
			}
		});
		
		TextView mText = (TextView) findViewById(R.id.zhcailicaisuc_text_money);
		mText.setText(money+"元");
		findViewById(R.id.zhcailicaisuc_text_ok).setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				setResult(11);
				finish();
			}
		});
	}
}
